<script>
<?php if (isset($errMsg)): ?>
        alert("<?php echo $errMsg; ?>");
<?php endif; ?>
    var obj = null;
    try {
        obj = parent.window.jQuery.fn.uploadModal.objs[<?php echo $i ?>];
    } catch (e) {
    }
    if (obj) {
        obj.options.success(<?php echo $data; ?>);
    }
</script>